const resursion = (level, params) => {
  // recursion terminator
  if (level > MAX_LEVEL) {
    process_result
    return
  }
  // process current level
  process(level, params)
  // drill down
  recursion(level + 1, paraams)
  // clean current level status if needed
}
